package com.xdf.xzymanagementsystem.dao;

import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;
import com.xdf.xzymanagementsystem.entity.UploadContract;
import com.xdf.xzymanagementsystem.util.Example;
import org.apache.ibatis.annotations.Param;

/**
 * 版本号：20240401
 * @Description : 由代码生成器生成
 * @Author : chanchaw
 * @Date :  2024-10-9 15:18:45
 */
@Repository
public interface UploadContractMapper {
    int insert(UploadContract record);

    int insertSelective(UploadContract record);

    int multiInsert(List<UploadContract> list);

    int updateByPrimaryKey(UploadContract record);

    int updateByPrimaryKeySelective(UploadContract record);

    // 根据主键删除
    int deleteByPrimaryKey(Integer id);
    // 根据主键查询
    UploadContract selectByPrimaryKey(Integer id);

    List<UploadContract> selectAll();

    int save(UploadContract record);
    int multiSave(List<UploadContract> list);

    //================= 下面是 Example 代码 ==================
    List<UploadContract> selectByExample(@Param("example") Example example);
    int updateByExampleSelective(@Param("record") UploadContract record,@Param("example") Example example);
    int insertByExampleSelective(@Param("record") UploadContract record,@Param("example") Example example);
    int deleteByExample(@Param("example") Example example);

    UploadContract getNext(Integer id);
    UploadContract getPrev(Integer id);
    UploadContract getFirst();
    UploadContract getLast();

    //=================以上是自动生成的代码，自定义代码请写在下面==================
    List<UploadContract> selectByContactCode(String contactCode);

    List<UploadContract> selectByContactCodeType(@Param("contactCode") String contactCode, @Param("type") Integer type);

    List<UploadContract> selectUploadContract(UploadContract uploadContract);

    List<UploadContract> selectByDateTime(@Param("contactCode") String contactCode,
                                          @Param("type") Integer type,
                                          @Param("start") Date start,
                                          @Param("end") Date end);
}